//--------------------------------------------------------------
//
// Qizhi Zhang 
// ezhung@gmail.com
// http://www.moorwind.com
//
//--------------------------------------------------------------
package reader.dao
{
	import __AS3__.vec.Vector;
	
	import flash.utils.Dictionary;
	
	import reader.model.vo.BlogSourceVO;
	import reader.model.vo.BlogItemVO;
	import reader.model.vo.UserVO;
	
	public interface IBlogDAO
	{
		function insertBlog(blog:BlogItemVO, user:UserVO):int;
		
		function insertBlogs(blogs:Vector.<BlogItemVO>, user:UserVO):void;
		
		function updateBlog(blog:BlogItemVO):Boolean;
		
		function updateBlogIsRead(blog:BlogItemVO):Boolean;
		
		function updateBlogs(blogs:Vector.<BlogItemVO>, user:UserVO):void;
		
		function searchBlog(keywords:String, user:UserVO, blogSourceIdArray:Vector.<int>):Vector.<BlogItemVO>
		
		function deleteBlog(blog:BlogItemVO):Boolean;
		
		function deleteBlogByBlogSource(blogsourceId:int):Boolean;
		
		function deleteBlogByBlogSources(blogsourceId:Vector.<BlogSourceVO>):void;
		
		function deleteBlogByUser(user:UserVO):Boolean;
		
		function selectBlog(blogid:int):BlogItemVO;
		
		function selectBlogsByBlogSource(blogsourceId:int):Vector.<BlogItemVO>;
		
		function selectBlogsByBlogSourceUnread(blogsourceId:int):Vector.<BlogItemVO>;
		
		function selectBlogsStar(user:UserVO):Vector.<BlogItemVO>;
		
		function selectAllBlogs(user:UserVO):Vector.<BlogItemVO>;
		
		function selectAllBlogsUnread(user:UserVO):Vector.<BlogItemVO>;
		
		function selectByBlogSourceLabel(blogSourceIdArray:Vector.<int>):Vector.<BlogItemVO>;
		
		function selectByBlogSourceLabelUnread(blogSourceIdArray:Vector.<int>):Vector.<BlogItemVO>;
		
		function selectSummary(blogsource:Vector.<BlogSourceVO>, maxItems:int):Dictionary;
		
		function getCount(user:UserVO):uint;
		
		function getUnreadCount(user:UserVO):uint;
	}
}